package com.googlecode.restitory.api;

import java.util.List;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

public interface JsonService {

	public String put(JsonObject obj);

	public String post(JsonObject obj);

	public JsonObject get(String id);

	public void delete(String id);

	public void delete(String id, Long rev);

	public JsonObject cursor(JsonObject query);

	public JsonArray query(JsonObject query);

	public Long count(JsonObject query);

	public JsonArray getAll(Iterable<String> paths);

	public JsonArray getAll(JsonArray paths);

	public JsonArray putAll(Iterable<JsonObject> jsons);

	public JsonArray putAll(JsonArray jsons);

	public JsonArray postAll(Iterable<JsonObject> jsons);

	public JsonArray postAll(JsonArray jsons);

	public void deleteAll(Iterable<String> paths);

	public void deleteAll(JsonArray paths);

	public abstract String generatePath(String name);

	public abstract List<String> generatePaths(String name, int size);

}
